<?php include('header_h.php'); ?>
<div id="post">
	<!-- 幻灯片 -->
	<div class="slider_box">
		<?php include (TEMPLATEPATH . '/includes/slider.php'); ?>
	</div>
	<!-- end: 幻灯片 -->
	<div class="clear12"></div>
	<!-- 本周关注 -->
	<?php include(TEMPLATEPATH . '/includes/new_post.php'); ?>
	<!-- ad  首页 -->
	<?php include(TEMPLATEPATH . '/includes/ad_idx_728.php'); ?>
	<div id="cmsl">
		<?php $display_categories = explode(',', get_option('swt_catl') ); foreach ($display_categories as $category) { ?>
			<?php
				query_posts( array(
					'showposts' => 1,
					'cat' => $category,
					'post__not_in' => $do_not_duplicate
					)
				);
			?>
		<div class="entry_box_h">
			<?php while (have_posts()) : the_post(); ?>
				<div class="box_entry_title_h">
					<div class="tit">
						<h2><?php single_cat_title(); ?></h2>
						<a href="<?php echo get_category_link($category);?>" target="_blank">更多 &gt;&gt;</a>
					</div>
					<div class="ico">
						<?php if (get_option('swt_ico') == '显示') { ?><?php include('includes/cat_ico.php'); ?><?php } else { } ?>
					</div>
				</div>
				<!-- end: box_entry_title_h -->
			<div class="clear"></div>
			<div class="sort en_box">
				<div class="thumbnail_box_h box_left">
					<?php include('includes/thumbnail.php'); ?>
				</div>
				<div class="box_right">
					<h3>
						<a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title_attribute(); ?>" target="_blank"><?php echo cut_str($post->post_title,40); ?></a>
					</h3>
					<div class="cat_box">
						<?php echo mb_strimwidth(strip_tags(apply_filters('the_content', $post->post_content)), 0, 65,"..."); ?>
					</div>
				</div>
				<div class="clear"></div>
			</div>			
			<?php endwhile; ?>
			<div class="cat_post_box">
		  		<?php
					query_posts( array(
						'showposts' => get_option('swt_cat_n'),
						'cat' => $category,
						'offset' => 1,
						'post__not_in' => $do_not_duplicate
						)
		 			);
				?>
				<?php while (have_posts()) : the_post(); ?>
				<ul><li>
					<span class="hoem_date"><?php the_time('m/d') ?></span>
					
					<a href="<?php the_permalink() ?>" rel="bookmark" 
					title="
						<?php if (has_excerpt())
						{ ?> 
							<?php the_excerpt() ?>
						<?php
						}
						else{
							echo mb_strimwidth(strip_tags(apply_filters('the_content', $post->post_content)), 0, 190,"...");
						}
						?>">
						<?php echo cut_str($post->post_title,38); ?></a>
					</li></ul>
				<!-- end: cat_post -->
				<?php endwhile; ?>
			</div>
			<!-- end: cat_post_box -->
				<div class="clear"></div>
			<i class="lt"></i>
			<i class="rt"></i>
		</div>
		<!-- end: cat_post_box_h -->
		<div class="cms_box_b">
			<i class="lb"></i>
			<i class="rb"></i>
		</div>
		<?php } ?>
	</div>
	<!-- end: cmsl -->

	<div id="cmsr">
		<?php $display_categories = explode(',', get_option('swt_catr') ); foreach ($display_categories as $category) { ?>
		<?php
			query_posts( array(
				'showposts' => 1,
				'cat' => $category,
				'post__not_in' => $do_not_duplicate
				)
			);
		?>
		<div class="entry_box_h">
			<?php while (have_posts()) : the_post(); ?>
			<div class="box_entry_title_h">
				<div class="tit">
					<h2><?php single_cat_title(); ?></h2>
					<a href="<?php echo get_category_link($category);?>" target="_blank">更多 &gt;&gt;</a>
				</div>
				<div class="ico">
					<?php if (get_option('swt_ico') == '显示') { ?><?php include('includes/cat_ico.php'); ?><?php } else { } ?>
				</div>
			</div>
			<!-- end: box_entry_title_h -->
			<div class="clear"></div>
			<div class="sort en_box">
				<div class="thumbnail_box_h">
					<?php include('includes/thumbnail.php'); ?>
				</div>
				<div class="box_right">
					<h3>
						<a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title_attribute(); ?>" target="_blank"><?php echo cut_str($post->post_title,40); ?></a>
					</h3>
					<div class="cat_box">
						<?php echo mb_strimwidth(strip_tags(apply_filters('the_content', $post->post_content)), 0, 65,"..."); ?>
					</div>
				</div>
			</div>
			<?php endwhile; ?>
			<div class="cat_post_box">
		  		<?php
					query_posts( array(
						'showposts' => get_option('swt_cat_n'),
						'cat' => $category,
						'offset' => 1,
						'post__not_in' => $do_not_duplicate
						)
		 			);
				?>
				<?php while (have_posts()) : the_post(); ?>
				<ul><li>
					<span class="hoem_date"><?php the_time('m/d') ?></span>
					
					<a href="<?php the_permalink() ?>" rel="bookmark" 
					title="
						<?php if (has_excerpt())
						{ ?> 
							<?php the_excerpt() ?>
						<?php
						}
						else{
							echo mb_strimwidth(strip_tags(apply_filters('the_content', $post->post_content)), 0, 190,"...");
						}
						?>">
						<?php echo cut_str($post->post_title,38); ?></a>
					</li></ul>
				<!-- end: cat_post -->
				<?php endwhile; ?>
			</div>
			<!-- end: cat_post_box -->
				<div class="clear"></div>
			<i class="lt"></i>
			<i class="rt"></i>
		</div>
		<!-- end: cat_post_box_h -->
		<div class="cms_box_b">
			<i class="lb"></i>
			<i class="rb"></i>
		</div>
		<?php } ?>
	</div>
	<!-- end: cmsr -->
</div>
<!-- end: post -->
<?php get_sidebar(); ?>
<?php get_footer(); ?>